package com.fxl.majiang.service.impl;

import com.fxl.majiang.config.UserConfig;
import com.fxl.majiang.service.UserService;
import com.fxl.majiang.user.User;
import com.fxl.majiang.vo.ApiResponse;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author fengxinglei
 * @date 2022/8/16 16:41
 * @description TODO
 */
@Service("userService")
public class UserServiceImpl implements UserService {

    @Resource
    private UserConfig userConfig;

    @Override
    public boolean check(String userId) {
        for (User user : userConfig.getUsers()) {
            if (user.getId().equals(userId)) {
                return true;
            }
        }
        return false;
    }
}
